<template>
	<view class="store bgff r9 mx12 mb8">
		<view class="flex flexC flexB py13 px14 titlebox">
			<text class="c00 fs16 mr10 bold6 flex1 ellipsis1">{{item.name}}</text>
			<text v-if="item.status_txt == '营业中'" class="status r3 fs10 bgf95 aliC px6 py2 bold6">{{item.status_txt}}</text>
			<text v-if="item.status_txt == '筹备中'" class="status r3 fs10 bgff0  aliC px6 py2 bold6">{{item.status_txt}}</text>
			<text v-if="item.status_txt == '试营业'" class="status r3 fs10 bgf6c aliC px6 py2 bold6">{{item.status_txt}}</text>
			<text v-if="item.status_txt == '休息中'" class="status r3 fs10 bgb5 aliC px6 py2 bold6">{{item.status_txt}}</text>
			
		</view>
		<view class="px14 py12 flex flexC " @click="detail(item)">
			<view class="rel">
				<image @click.stop="look(item.logo)" class="logo r9" :src="item.logo" mode="aspectFill"></image>
			</view>
			
			<view class="flex1 pl12">
				<!-- <view class="flex flexC">
					<text class="fs10 bgf6c r2 px4 bold6">标准店</text>
					<text class="c00 dinline mx10 bold6 flex1 ellipsis1">{{item.name}}</text>
					<text v-if="item.status_txt == '营业中'" class="status r40 fs10 bgf6c aliC px6 py2 bold6">{{item.status_txt}}</text>
					<text v-if="item.status_txt == '筹备中'" class="status r40 fs10 bgff0  aliC px6 py2 bold6">{{item.status_txt}}</text>
					<text v-if="item.status_txt == '试营业'" class="status r40 fs10 bgf6c aliC px6 py2 bold6">{{item.status_txt}}</text>
					<text v-if="item.status_txt == '休息中'" class="status r40 fs10 bgb5 aliC px6 py2 bold6">{{item.status_txt}}</text>
				</view> -->
				<view class="ellipsis2 c85 fs12" >
					<!-- <image class="local aliM" src="/static/img/icon/address.png" mode="widthFix"></image> -->
					<text class="aliM">{{item.address}}</text>
				</view>
				<view class="flex flexC flexB fs12 mt8">
					<text class="c85">{{item.distance}}</text>
					<text class="cf95 fs11">{{item.bookTime}}</text>
				</view>
				<view class="mt8 fs12 c1a flex flexC mt10">
					<view class="bgf5 r2 mr9 flex flexC">
						<image class="w17" src="/static/img/icon/pai.png" mode="aspectFill"></image>
						<text class="c57 ml2">棋牌</text>
					</view>
					<view class="bgf5 r2 flex flexC" v-if="item.is_table ==1">
						<image class="w17" src="/static/img/icon/ball.png" mode="aspectFill"></image>
						<text class="c57 ml2">台球</text>
					</view>
				</view>
				<view class="fs13 flex flexC mt16">
					<image @click.stop="location(item)" class="w44" src="/static/img/icon/local2.png" mode="aspectFill"></image>
					<image @click.stop="call(item)" class="w44 ml14" src="/static/img/icon/call3.png" mode="aspectFill"></image>
					<text class="bgf5c px16 py10 r40 bold6 ml14" >立即预定</text>
					<text class="flex1" ></text>
				</view>
			</view>
		</view>
	</view>
	
</template>

<script>
	export default {
		name:"storeItem",
		props: {
			item: {
				type: Object,
				default: {}
			}
		},
		methods: {
			
			look(img){
				let image = Array();
				image.push(img);
				uni.previewImage({
					urls:image,
				});
			},
			
			location(item){
				this.$emit("location",item)
			},
			call(item){
				this.$emit("call",item)
				
			},
			detail(item){
				this.$emit("detail",item)
				
			}
		}
	}
</script>

<style lang="scss" scoped>
.store {
	.titlebox {
		background: linear-gradient(to right,#FFFBE3,#FFF6C5);
		border-radius: 18rpx 18rpx 0 0;
	}
	.rel {
		position: relative;
		.status {position: absolute;bottom: 10rpx;left: 10rpx;}
	}
	.logo {width: 210rpx;height: 280rpx;}
	.ellipsis1 {width: 436rpx;
		&.flex1 {width: 280rpx;}
	}
	.w17 {width: 34rpx;height: 34rpx;}
	.bgf95 {color: #F95C28;}
	.cf95 {color: #F95C28;}
	.local {width: 24rpx;height: 24rpx;}
	.w44 {width: 88rpx;height: 68rpx;}
	.bgf5c {background-color: #F5C51D;}
}
</style>